﻿/*
   Open Intel 
   Copyright © 2011 – ISC. All Rights Reserved.
*/

using System;
using System.Windows.Media.Imaging;
using Caliburn.Micro;

namespace OI.ViewModels
{
    public class ImagePopupViewModel : Screen
    {
        public BitmapImage Photo { get; private set; }
        public Uri PhotoUri { get; private set; }

        public ImagePopupViewModel(BitmapImage photo, Uri uri)
        {
            Photo = photo;
            PhotoUri = uri;

            this.DisplayName = PhotoUri.GetComponents(UriComponents.Path, UriFormat.Unescaped);
        }

        public void Ok()
        {
            TryClose();
        }
    }
}
